Skip to content

[Backport 2.1-develop] Update Store getConfig() to respect valid false return value #13654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2018

Conversation

JeroenVanLeusden
Copy link
Member

Backport of #13653

Description

Using a config setting Yes/No will return string '0' when No is saved. Method will therefore fetch default config value because '0' equals false. Removed the ScopeConfigInterface::SCOPE_TYPE_DEFAULT because it's the default value.

Fixed Issues (if relevant)

  1. None I could find.

Manual testing scenarios

  1. Add config value to Store module in both default and store view scope.
  2. Set config on store scope to No.
  3. Value '0' is returned and value from default scope is fetched.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Using a config setting Yes/No will return string '0' when No is saved. Method will therefore fetch default config value because '0' equals false.
@rogyar rogyar self-assigned this Mar 11, 2018
@magento-engcom-team magento-engcom-team added this to the March 2018 milestone Mar 18, 2018
@magento-engcom-team magento-engcom-team merged commit 73ca354 into magento:2.1-develop Mar 20, 2018
magento-engcom-team pushed a commit that referenced this pull request Mar 20, 2018
@JeroenVanLeusden JeroenVanLeusden deleted the patch-9 branch March 20, 2018 17:11
@paales paales added Partner: Reach Digital Pull Request is created by partner Reach Digital and removed Partner: Reach Digital Pull Request is created by partner Reach Digital labels May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Reach Digital Pull Request is created by partner Reach Digital Progress: accept Release Line: 2.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants